package dick;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class mytest {
    @Test
    public void testMethodAutowire() {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        people people = (people) context.getBean("people");
        people.getAdult().speak();
        people.getChild().speak();
    }
}
